using System.ComponentModel.DataAnnotations;

namespace Auth.Application.DTO.Input
{
    /// <summary>
    /// 用户注册输入DTO
    /// </summary>
    public class RegisterInput
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空")]
        [StringLength(50, MinimumLength = 2, ErrorMessage = "用户名长度必须在2-50个字符之间")]
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "密码不能为空")]
        [StringLength(100, MinimumLength = 6, ErrorMessage = "密码长度必须在6-100个字符之间")]
        public string Password { get; set; }

        /// <summary>
        /// 确认密码
        /// </summary>
        [Required(ErrorMessage = "确认密码不能为空")]
        [Compare("Password", ErrorMessage = "两次输入的密码不一致")]
        public string ConfirmPassword { get; set; }

        /// <summary>
        /// 真实姓名
        /// </summary>
        [StringLength(50, ErrorMessage = "真实姓名长度不能超过50个字符")]
        public string RealName { get; set; }

        /// <summary>
        /// 电子邮箱
        /// </summary>
        
        [StringLength(100, ErrorMessage = "用户编码长度不能超过32个字符")]
        public string UserCode { get; set; }

        /// <summary>
        /// 手机号码
        /// </summary>
        [Phone(ErrorMessage = "手机号码格式不正确")]
        [StringLength(20, ErrorMessage = "手机号码长度不能超过20个字符")]
        public string Phone { get; set; }
    }
} 